\(\int \sqrt {3+3 \sin (e+f x)} \, dx\) [525]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 25 \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=-\frac {6 \cos (e+f x)}{f \sqrt {3+3 \sin (e+f x)}} \]

[Out]

-2*a*cos(f*x+e)/f/(a+a*sin(f*x+e))^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.04, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2725} \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=-\frac {2 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}} \]

[In]

Int[Sqrt[a + a*Sin[e + f*x]],x]

[Out]

(-2*a*Cos[e + f*x])/(f*Sqrt[a + a*Sin[e + f*x]])

Rule 2725

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*b*(Cos[c + d*x]/(d*Sqrt[a + b*Sin[c + d*x
]])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(68\) vs. \(2(25)=50\).

Time = 0.02 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.72 \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=\frac {2 \sqrt {3} \left (-\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {1+\sin (e+f x)}}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \]

[In]

Integrate[Sqrt[3 + 3*Sin[e + f*x]],x]

[Out]

(2*Sqrt[3]*(-Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*Sqrt[1 + Sin[e + f*x]])/(f*(Cos[(e + f*x)/2] + Sin[(e + f*x)
/2]))

Maple [A] (verified)

Time = 0.70 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.72

method result size
default \(\frac {2 \left (\sin \left (f x +e \right )+1\right ) \left (\sin \left (f x +e \right )-1\right ) a}{\cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) \(43\)
risch \(-\frac {i \sqrt {2}\, \sqrt {-a \left (-2-2 \sin \left (f x +e \right )\right )}\, \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+2 i {\mathrm e}^{i \left (f x +e \right )}-1\right ) f}\) \(74\)

[In]

int((a+a*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*(sin(f*x+e)+1)*(sin(f*x+e)-1)*a/cos(f*x+e)/(a+a*sin(f*x+e))^(1/2)/f

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (24) = 48\).

Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 2.00 \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=-\frac {2 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )}}{f \cos \left (f x + e\right ) + f \sin \left (f x + e\right ) + f} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

-2*sqrt(a*sin(f*x + e) + a)*(cos(f*x + e) - sin(f*x + e) + 1)/(f*cos(f*x + e) + f*sin(f*x + e) + f)

Sympy [F]

\[ \int \sqrt {3+3 \sin (e+f x)} \, dx=\int \sqrt {a \sin {\left (e + f x \right )} + a}\, dx \]

[In]

integrate((a+a*sin(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(a*sin(e + f*x) + a), x)

Maxima [F]

\[ \int \sqrt {3+3 \sin (e+f x)} \, dx=\int { \sqrt {a \sin \left (f x + e\right ) + a} \,d x } \]

[In]

integrate((a+a*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sin(f*x + e) + a), x)

Giac [A] (verification not implemented)

none

Time = 0.51 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.44 \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=\frac {2 \, \sqrt {2} \sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{f} \]

[In]

integrate((a+a*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(2)*sqrt(a)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/4*pi + 1/2*f*x + 1/2*e)/f

Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.32 \[ \int \sqrt {3+3 \sin (e+f x)} \, dx=-\frac {2\,\cos \left (e+f\,x\right )\,\sqrt {a\,\left (\sin \left (e+f\,x\right )+1\right )}}{f\,\left (\sin \left (e+f\,x\right )+1\right )} \]

[In]

int((a + a*sin(e + f*x))^(1/2),x)

[Out]

-(2*cos(e + f*x)*(a*(sin(e + f*x) + 1))^(1/2))/(f*(sin(e + f*x) + 1))